<extend name="Index/index"/>

<block name="content">
    <!--<div class="view-product" style="margin-top: 50px">-->
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">{{$title}}</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">
                <div class="demoTable">
                    <form action="{{:U('Donation/index')}}" method="get">
                        捐款人：
                        <div class="layui-inline">
                            <input class="layui-input" name="name"  autocomplete="off">
                        </div>
                        &nbsp;捐款项目：
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="item" lay-search="" class="form-control">
                                    <option value="">所有</option>
                                    <foreach name="itemList" item="val">
                                        <option value="{{$val.id}}">{{$val.item}}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        &nbsp;时间：
                        <div class="layui-inline">
                            <input class="layui-input" style="width: 200px" name="time" id="test1"  autocomplete="off">
                        </div>
                        &nbsp;排序：
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="order" lay-search="" class="form-control">
                                    <option value="d.id" selected>ID</option>
                                    <option value="d.price">金额</option>
                                    <option value="d.create_time">发布时间</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="order1" lay-search="" class="form-control">
                                    <option value="asc" selected>正序</option>
                                    <option value="desc">倒序</option>
                                </select>
                            </div>
                        </div>

                        <input type="submit" value="搜索" class="layui-btn">
                    </form>
                </div>
                <if condition="$list eq null">
                    <div class="tr non-info show border-bottom-none">
                        <span>没查询到符合条件的记录</span>
                    </div>
                    <else />
                    <div class="demoTable">
                        <div class="layui-inline">
                            <h3>总金额: <span style="color:#f00;">{{$totalPrice}}</span>元</h3>
                        </div>
                    </div>
                    <table class="layui-table text-center">
                        <tr>
                            <th class="text-center">ID</th>
                            <th class="text-center">捐款人</th>

                            <th class="text-center">金额</th>
                            <th class="text-center">项目名称</th>
                            <th class="text-center">捐款时间</th>
                            <!--<th class="text-center">状态</th>-->
                            <!--<th class="text-center">操作</th>-->
                        </tr>
                        <foreach  name="list" item="vo" key="k">
                            <tr>
                                <td>{{$vo.id}}</td>
                                <td>{{$vo.name}}</td>
                                <td>{{$vo.price}}</td>
                                <td>{{$vo.item}}</td>
                                <td>{{:substr($vo['create_time'],0,10)}}</td>
                                <!--<td><a href="{{:U('Donation/showDetail',array('id'=>$vo['id']))}}" class="layui-btn layui-btn-sm layui-btn-normal">查看详情</a></td>-->
                            </tr>

                        </foreach>
                        <tr>
                            <td colspan="5"><div class="sabrosus">{{$page}}</div></td>
                        </tr>
                    </table>

                </if>

            </div>
        </div>
    <!--</div>-->
    <script>
        layui.use('laydate', function() {
            var laydate = layui.laydate;
            //年选择器
            laydate.render({
                elem: '#test1'
                ,range: true
            });
        });

    </script>
</block>